<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich"
	template="/layout/template.xhtml"
	xmlns:a4j="http://richfaces.org/a4j">
	<ui:define name="stylefms">
		<link href="/stylesheet/theme.css" rel="stylesheet" type="text/css" />
		<link href="/stylesheet/fms.css" rel="stylesheet" type="text/css" />
		<link href="/stylesheet/panel.css" rel="stylesheet" type="text/css" />
		<link href="/stylesheet/debug.css" rel="stylesheet" type="text/css" />
	</ui:define>
	<ui:define name="varProjectName">
		<ui:param name="projectName" value="#{appRes['mod.fms.com.maintenances.compras']}" />
	</ui:define>


	<ui:define name="body">
	

		<a4j:form id="buyMainGridForm" ajaxSingle="true">
			<rich:panel styleClass="form" style="height: 550px; position:relative;">
			<f:facet name="header"><h:outputText value="Transacciones" /></f:facet>
				<div class="button-container">
					<rich:panel styleClass="form" style="width:700px; height:100px; position:relative; margin-bottom:10px;">
						<f:facet name="header">Pedidos</f:facet>
						<div class="button-trn-cont" >
						<a4j:commandButton styleClass="button-trn" value="Pedido"
							onclick="#{rich:component('modalOrder')}.show()">
							<div class="button-trn-img"><h:graphicImage value="/img/icons/order.png"></h:graphicImage></div>
						</a4j:commandButton>
						</div>
						<rich:spacer width="10" />
						<div class="button-trn-cont" >
						<a4j:commandButton styleClass="button-trn" value="Consulta de Pedidos"
							onclick="#{rich:component('modalOrderQuery')}.show()">
							<div class="button-trn-img"><h:graphicImage value="/img/icons/order.png"></h:graphicImage></div>
						</a4j:commandButton>
						</div>
						<rich:spacer width="10" />
						<div class="button-trn-cont" >
						<a4j:commandButton styleClass="button-trn" value="Confirmar Pedidos"
							onclick="#{rich:component('modalOrderConfirm')}.show()">
							<div class="button-trn-img"><h:graphicImage value="/img/icons/order.png"></h:graphicImage></div>
						</a4j:commandButton>
						</div>
						<rich:spacer width="10" />
						<div class="button-trn-cont" >
						<a4j:commandButton styleClass="button-trn" value="Anular Pedidos"
							onclick="#{rich:component('modalOrderCancel')}.show()">
							<div class="button-trn-img"><h:graphicImage value="/img/icons/order.png"></h:graphicImage></div>
						</a4j:commandButton>
						</div>
					</rich:panel>
					<rich:panel styleClass="form" style="width:700px; height:170px; position:relative; margin-bottom:10px;">
						<f:facet name="header">Compras</f:facet>
						<div class="button-trn-cont" >
						<a4j:commandButton styleClass="button-trn" value="Compra"
							onclick="#{rich:component('modalBuy')}.show()">
							<div class="button-trn-img"><h:graphicImage value="/img/icons/shopping_cart.png"></h:graphicImage></div>
						</a4j:commandButton>
						</div>
						<rich:spacer width="10" />
						<div class="button-trn-cont" >
						<a4j:commandButton styleClass="button-trn" value="Consulta de Compras"
							onclick="#{rich:component('modalBuyQuery')}.show()">
							<div class="button-trn-img"><h:graphicImage value="/img/icons/shopping_cart.png"></h:graphicImage></div>
						</a4j:commandButton>
						</div>
						<rich:spacer width="10" />
						<div class="button-trn-cont" >
						<a4j:commandButton styleClass="button-trn" value="Confirmar Compras"
							onclick="#{rich:component('modalBuyConfirm')}.show()">
							<div class="button-trn-img"><h:graphicImage value="/img/icons/shopping_cart.png"></h:graphicImage></div>
						</a4j:commandButton>
						</div>
						<rich:spacer width="10" />
						<div class="button-trn-cont" >
						<a4j:commandButton styleClass="button-trn" value="Anular Compras"
							onclick="#{rich:component('modalBuyCancel')}.show()">
							<div class="button-trn-img"><h:graphicImage value="/img/icons/shopping_cart.png"></h:graphicImage></div>
						</a4j:commandButton>
						</div>
						<rich:spacer width="10" />
						<div class="button-trn-cont" >
						<a4j:commandButton styleClass="button-trn" value="Saldo Proveedores"
							onclick="#{rich:component('modalFeesToSuppliers')}.show()">
							<div class="button-trn-img"><h:graphicImage value="/img/icons/shopping_cart.png"></h:graphicImage></div>
						</a4j:commandButton>
						</div>
					</rich:panel>
					
					<rich:panel styleClass="form" style="width:700px; height:100px; position:relative; margin-bottom:10px;">
						<f:facet name="header">Pagos</f:facet>
						<div class="button-trn-cont" >
						<a4j:commandButton styleClass="button-trn" value="Orden de Pago"
							onclick="#{rich:component('modalPayOrder')}.show()">
							<div class="button-trn-img"><h:graphicImage value="/img/icons/user_accept.png"></h:graphicImage></div>
						</a4j:commandButton>
						</div>
						<rich:spacer width="10" />
						<div class="button-trn-cont" >
						<a4j:commandButton styleClass="button-trn" value="Autorizar o Anular Orden de Pago"
							onclick="#{rich:component('modalPayAuth')}.show()">
							<div class="button-trn-img"><h:graphicImage value="/img/icons/dollar.png"></h:graphicImage></div>
						</a4j:commandButton>
						</div>
						<rich:spacer width="10" />
						<div class="button-trn-cont" >
						<a4j:commandButton styleClass="button-trn" value="Consulta de Ordenes de Pago"
							onclick="#{rich:component('modalPayOrderQuery')}.show()">
							<div class="button-trn-img"><h:graphicImage value="/img/icons/dollar.png"></h:graphicImage></div>
						</a4j:commandButton>
						</div>
					</rich:panel>
				</div>
			</rich:panel>	
		</a4j:form>
		
		
		<rich:modalPanel 
			id="modalOrder"  
			width="1024" 
			height="500" 
			resizeable="false" 
			autosized="false">
			<f:facet name="header">
				<h:panelGroup>
					<h:outputText value="Pedido" />
				</h:panelGroup>
			</f:facet>
			<f:facet name="controls">
				<h:panelGroup>
					<h:graphicImage value="/img/close.png" style="cursor:pointer"
						id="modalOrderHide" />
					<rich:componentControl for="modalOrder"
						attachTo="modalOrderHide" operation="hide" event="onclick" />
				</h:panelGroup>
			</f:facet>
			<h:panelGroup id="modalOrderEdit">
			<!--  **** Include of the update page ****  -->
				<a4j:include viewId="/fms/com/transactions/comOrder.xhtml" />
			</h:panelGroup>
		</rich:modalPanel>
		
		<rich:modalPanel  
			id="modalOrderQuery"  
			width="1024" 
			height="500" 
			resizeable="false" 
			autosized="false" 
			top="30">
			<f:facet name="header">
				<h:panelGroup>
					<h:outputText value="Consultar Pedidos" />
				</h:panelGroup>
			</f:facet>
			<f:facet name="controls">
				<h:panelGroup>
					<h:graphicImage value="/img/close.png" style="cursor:pointer"
						id="modalOrderQueryHide" />
					<rich:componentControl for="modalOrderQuery"
						attachTo="modalOrderQueryHide" operation="hide" event="onclick" />
				</h:panelGroup>
			</f:facet>
			<h:panelGroup id="modalOrderQueryEdit">
			<!--  **** Include of the update page ****  -->
				<a4j:include viewId="/fms/com/transactions/comOrderQuery.xhtml" />
			</h:panelGroup>
		</rich:modalPanel>
		
		<rich:modalPanel  
			id="modalOrderConfirm"  
			width="1024" 
			height="500" 
			resizeable="false" 
			autosized="false" 
			top="30">
			<f:facet name="header">
				<h:panelGroup>
					<h:outputText value="Confirmar Pedidos" />
				</h:panelGroup>
			</f:facet>
			<f:facet name="controls">
				<h:panelGroup>
					<h:graphicImage value="/img/close.png" style="cursor:pointer"
						id="modalOrderConfirmHide" />
					<rich:componentControl for="modalOrderConfirm"
						attachTo="modalOrderConfirmHide" operation="hide" event="onclick" />
				</h:panelGroup>
			</f:facet>
			<h:panelGroup id="modalOrderConfirmEdit">
			<!--  **** Include of the update page ****  -->
				<a4j:include viewId="/fms/com/transactions/comOrderConfirm.xhtml" />
			</h:panelGroup>
		</rich:modalPanel>
		
		<rich:modalPanel  
			id="modalOrderCancel"  
			width="1024" 
			height="500" 
			resizeable="false" 
			autosized="false" 
			top="30">
			<f:facet name="header">
				<h:panelGroup>
					<h:outputText value="Confirmar Pedidos" />
				</h:panelGroup>
			</f:facet>
			<f:facet name="controls">
				<h:panelGroup>
					<h:graphicImage value="/img/close.png" style="cursor:pointer"
						id="modalOrderCancelHide" />
					<rich:componentControl for="modalOrderCancel"
						attachTo="modalOrderCancelHide" operation="hide" event="onclick" />
				</h:panelGroup>
			</f:facet>
			<h:panelGroup id="modalOrderCancelEdit">
			<!--  **** Include of the update page ****  -->
				<a4j:include viewId="/fms/com/transactions/comOrderCancel.xhtml" />
			</h:panelGroup>
		</rich:modalPanel>
	
		<rich:modalPanel  
			id="modalBuy"  
			width="1024" 
			height="500" 
			resizeable="false"
			autosized="false">
			<f:facet name="header">
				<h:panelGroup>
					<h:outputText value="Compra" />
				</h:panelGroup>
			</f:facet>
			<f:facet name="controls">
				<h:panelGroup>
					<h:graphicImage value="/img/close.png" style="cursor:pointer"
						id="modalBuyHide" />
					<rich:componentControl for="modalBuy"
						attachTo="modalBuyHide" operation="hide" event="onclick" />
				</h:panelGroup>
			</f:facet>
			<h:panelGroup id="modalBuyEdit">
			<!--  **** Include of the update page ****  -->
				<a4j:include viewId="/fms/com/transactions/comBuy.xhtml" />
			</h:panelGroup>
		</rich:modalPanel>
		
		<rich:modalPanel  
			id="modalBuyQuery"  
			width="1024" 
			height="400" 
			resizeable="false" 
			autosized="false" 
			top="30">
			<f:facet name="header">
				<h:panelGroup>
					<h:outputText value="Consultar Compras" />
				</h:panelGroup>
			</f:facet>
			<f:facet name="controls">
				<h:panelGroup>
					<h:graphicImage value="/img/close.png" style="cursor:pointer"
						id="modalBuyQueryHide" />
					<rich:componentControl for="modalBuyQuery"
						attachTo="modalBuyQueryHide" operation="hide" event="onclick" />
				</h:panelGroup>
			</f:facet>
			<h:panelGroup id="modalBuyQueryEdit">
			<!--  **** Include of the update page ****  -->
				<a4j:include viewId="/fms/com/transactions/comBuyQuery.xhtml" />
			</h:panelGroup>
		</rich:modalPanel>
		
		<rich:modalPanel  
			id="modalBuyConfirm" 
			 width="1024" 
			 height="500" 
			resizeable="false" 
			autosized="false" 
			top="30">
			<f:facet name="header">
				<h:panelGroup>
					<h:outputText value="Confirmar Compras" />
				</h:panelGroup>
			</f:facet>
			<f:facet name="controls">
				<h:panelGroup>
					<h:graphicImage value="/img/close.png" style="cursor:pointer"
						id="modalBuyConfirmHide" />
					<rich:componentControl for="modalBuyConfirm"
						attachTo="modalBuyConfirmHide" operation="hide" event="onclick" />
				</h:panelGroup>
			</f:facet>
			<h:panelGroup id="modalBuyConfirmEdit">
			<!--  **** Include of the update page ****  -->
				<a4j:include viewId="/fms/com/transactions/comBuyConfirm.xhtml" />
			</h:panelGroup>
		</rich:modalPanel>
		
		<rich:modalPanel  
			id="modalBuyCancel"  
			width="1024" 
			height="500" 
			resizeable="false"
			autosized="false" 
			top="30">
			<f:facet name="header">
				<h:panelGroup>
					<h:outputText value="Anular Compras" />
				</h:panelGroup>
			</f:facet>
			<f:facet name="controls">
				<h:panelGroup>
					<h:graphicImage value="/img/close.png" style="cursor:pointer"
						id="modalBuyCancelHide" />
					<rich:componentControl for="modalBuyCancel"
						attachTo="modalBuyCancelHide" operation="hide" event="onclick" />
				</h:panelGroup>
			</f:facet>
			<h:panelGroup id="modalBuyCancelEdit">
			<!--  **** Include of the update page ****  -->
				<a4j:include viewId="/fms/com/transactions/comBuyCancel.xhtml" />
			</h:panelGroup>
		</rich:modalPanel>
		
		<rich:modalPanel  
			id="modalFeesToSuppliers"  
			width="1024" 
			height="500" 
			resizeable="false" 
			autosized="false" 
			top="30">
			<f:facet name="header">
				<h:panelGroup>
					<h:outputText value="Consultar Compras" />
				</h:panelGroup>
			</f:facet>
			<f:facet name="controls">
				<h:panelGroup>
					<h:graphicImage value="/img/close.png" style="cursor:pointer"
						id="modalFeesToSuppliersHide" />
					<rich:componentControl for="modalFeesToSuppliers"
						attachTo="modalFeesToSuppliersHide" operation="hide" event="onclick" />
				</h:panelGroup>
			</f:facet>
			<h:panelGroup id="modalFeesToSuppliersEdit">
			<!--  **** Include of the update page ****  -->
				<a4j:include viewId="/fms/com/transactions/comFeesToSuppliersQuery.xhtml" />
			</h:panelGroup>
		</rich:modalPanel>
		
		<rich:modalPanel  
			id="modalPayOrder" 
			width="1024" 
			height="500" 
			resizeable="false" autosized="false" >
			<f:facet name="header">
				<h:panelGroup>
					<h:outputText value="Orden de Pago" />
				</h:panelGroup>
			</f:facet>
			<f:facet name="controls">
				<h:panelGroup>
					<h:graphicImage value="/img/close.png" style="cursor:pointer"
						id="modalPayOrderHide" />
					<rich:componentControl for="modalPayOrder"
						attachTo="modalPayOrderHide" operation="hide" event="onclick" />
				</h:panelGroup>
			</f:facet>
			<h:panelGroup id="modalPayOrderEdit">
			<!--  **** Include of the update page ****  -->
				<a4j:include viewId="/fms/com/transactions/comPayOrder.xhtml" />
			</h:panelGroup>
		</rich:modalPanel>
		
		<rich:modalPanel  
			id="modalPayAuth"  
			width="1024" 
			height="500" 
			resizeable="false" 
			autosized="false">
			<f:facet name="header">
				<h:panelGroup>
					<h:outputText value="Pago" />
				</h:panelGroup>
			</f:facet>
			<f:facet name="controls">
				<h:panelGroup>
					<h:graphicImage value="/img/close.png" style="cursor:pointer"
						id="modalPayAuthHide" />
					<rich:componentControl for="modalPayAuth"
						attachTo="modalPayAuthHide" operation="hide" event="onclick" />
				</h:panelGroup>
			</f:facet>
			<h:panelGroup id="modalPayAuthEdit">
			<!--  **** Include of the update page ****  -->
				<a4j:include viewId="/fms/com/transactions/comPayAuth.xhtml" />
			</h:panelGroup>
		</rich:modalPanel>
		
		<rich:modalPanel  
			id="modalPayOrderQuery"  
			width="1024" 
			height="500" 
			resizeable="false" 
			autosized="false">
			<f:facet name="header">
				<h:panelGroup>
					<h:outputText value="Consulta Orden de pago" />
				</h:panelGroup>
			</f:facet>
			<f:facet name="controls">
				<h:panelGroup>
					<h:graphicImage value="/img/close.png" style="cursor:pointer"
						id="modalPayOrderQueryHide" />
					<rich:componentControl for="modalPayOrderQuery"
						attachTo="modalPayOrderQueryHide" operation="hide" event="onclick" />
				</h:panelGroup>
			</f:facet>
			<h:panelGroup id="modalPayOrderQueryEdit">
			<!--  **** Include of the update page ****  -->
				<a4j:include viewId="/fms/com/transactions/comPayOrderQuery.xhtml" />
			</h:panelGroup>
		</rich:modalPanel>
		
		<rich:modalPanel 
			id="wait-dialog" 
			resizeable="false" 
			autosized="false" 
			width="400" height="65" 
			moveable="false" 
			shadowOpacity="0"
			style="border:2px solid #6FADDF;-webkit-border-radius: 3px;-moz-border-radius: 3px;">
			<f:facet name="header">Un momento por favor..</f:facet>
			<h:graphicImage value="/img/ajax/ajax_load_04.gif" style="width:16px; float:left; padding-right:10px;"/>
			<h:outputText id="wait-dialog-process-text" value="Su peticion esta siendo procesada"/>
		</rich:modalPanel>

	</ui:define>

</ui:composition>